package com.unismc.wixindemo.config;

import com.unismc.wixindemo.util.JsonUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "wechat")
public class WechatAccountConfig {

	/**
	 * 设置微信公众号的appid
	 */
	private String mpAppId;

	/**
	 * 设置微信公众号的app secret
	 */
	private String mpAppSecret;

	/**
	 * 设置微信公众号的token
	 */
	private String token;

	/**
	 * 设置微信公众号的EncodingAESKey
	 */
	private String aesKey;

	public String getMpAppId() {
		return mpAppId;
	}

	public void setMpAppId(String mpAppId) {
		this.mpAppId = mpAppId;
	}

	public String getMpAppSecret() {
		return mpAppSecret;
	}

	public void setMpAppSecret(String mpAppSecret) {
		this.mpAppSecret = mpAppSecret;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getAesKey() {
		return aesKey;
	}

	public void setAesKey(String aesKey) {
		this.aesKey = aesKey;
	}

	@Override
	public String toString() {
		return JsonUtils.toJson(this);
	}
}
